public class quick {
    public void quickstart(int[] arr){
        quick(arr,0,arr.length-1);
    }
    public void quick(int[] arr,int start,int end){
        if(start >= end){
            return;
        }
        int pivot = parition(arr,start,end);
        quick(arr,start,pivot-1);
        quick(arr,pivot+1,end);
    }

    private int parition(int[] arr, int left, int right) {
int tem = arr[left];
int i = left;
while(left<right){
    while ((left<right && arr[right]>=tem)){
        right--;
    }
    while ((left<right && arr[left]<=tem)){
        left++;
    }
    swage(arr,left,right);
}
swage(arr,i,left);
return left;
    }

    private void swage(int[] arr, int left, int right) {
        int tem = arr[left];
        arr[left] = arr[right];
        arr[right] = tem;
    }

    public static void main(String[] args) {

    }
}
